<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:o="http://openfaces.org/"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<head>
</head>
<body>
	<ui:composition template="/templates/default.xhtml">
	 	<ui:define name="title">OpenHDS - Relationship Details</ui:define>
	
		<ui:param name="crud" value="#{relationshipCrud}" />
		
		<ui:define name="listing">
			<ui:include src="list.xhtml" />
		</ui:define>
		<ui:define name="display">
		
		<h:outputText value="#{navController.breadcrumbTrail}" />
		
		<h1>#{msg.relationshipDetail}</h1>
			<h:form>
			
			 <h:outputText styleClass="error" value="#{relationshipCrud.item.statusMessage}" />
			
            <h:panelGrid columns="3">
            
                <h:outputText value="#{msg.relationshipIndividualA}:"/>
                <h:outputText />
                <h:outputText value="#{relationshipCrud.item.individualA}" converter="#{individualExtIdConverter}" />
                
                <h:outputText value="#{msg.relationshipIndividualB}:"/>
                <h:outputText />
                <h:outputText value="#{relationshipCrud.item.individualB}" converter="#{individualExtIdConverter}"/>
                
                <h:outputText value="#{msg.relationshipType}:"/>
                <img class="clickable" onclick="O$('popupWindowForMaritalStatusStartType').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                <h:outputText value="#{relationshipCrud.item.aIsToB}" />
                
                <h:outputText value="#{msg.relationshipStartDate}:"/>
                <h:outputText />
                <h:outputText value="#{relationshipCrud.item.startDate}" converter="#{calendarConverter}" />
                
                <h:outputText value="#{msg.relationshipEndDate}:"/>
                <h:outputText />
                <h:outputText value="#{relationshipCrud.item.endDate}" converter="#{calendarConverter}" />
                
                <h:outputText value="#{msg.relationshipEndEvent}:"/>
                <img class="clickable" onclick="O$('popupWindowForMaritalStatusEndType').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                <h:outputText value="#{relationshipCrud.item.endType}" />  
                
                <h:outputText value="#{msg.fieldWorkerId}"/>
                <h:outputText />
                <h:outputText value="#{relationshipCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}" />
             	
             	<h:outputText value="#{msg.insertDate}"/>
	            <h:outputText />
	            <h:outputText value="#{relationshipCrud.item.insertDate}" converter="#{calendarConverter}" />
             	
             	<h:outputText value="#{msg.insertBy}"/>
				<h:outputText />
				<h:outputText value="#{relationshipCrud.item.insertBy.fullName}" />
				
				<h:outputText value="#{msg.dataStatus}"/>
		    	<img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
				<h:outputText value="#{relationshipCrud.item.status}" />	
             </h:panelGrid>
            <br />
            <h:commandButton action="#{relationshipCrud.editSetup}" value="#{msg.lblEdit}">
                <f:setPropertyActionListener target="#{jsfService.itemId}" value="#{relationshipCrud.item.uuid}" />
            </h:commandButton>
            <h:outputText value=" " />
            <h:commandButton value="#{msg.lblCancel}" immediate="true" action="cancel" rendered="#{flowScope.updating}" />
        </h:form>
		</ui:define>		
	</ui:composition>
  </body>
</html>
